﻿Imports System.Windows.Forms

Public Class ErrorDialog

    Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.OK
        Me.Close()
    End Sub

    Private Sub ReportCondition_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ReportCondition_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.Yes

        Me.Close()
    End Sub

    Overloads Function Show(ByVal condition As String, ByVal stackTrace As String) As System.Windows.Forms.DialogResult
        Me.lCondition.Text = condition
        Me.TextBox1.Text = condition & vbCrLf & vbCrLf & stackTrace
        Show = Windows.Forms.DialogResult.Abort
    End Function
End Class
